Dynomotion

Group: DynoMotion Message: 12589 From: Hugh Sontag Date: 12/11/2015
Subject: Options for reading PC file from KMotion C program
Hi Tom,

I have a question about the wiki.

I am hoping to save an offset from the machine zero to the zero set in KMotionCNC (what I call the GCode zero) in a nonvolatile place.

I'd prefer not to have to flash the user data memory to accomplish this.

I found an entry in the Dynomotion wiki which suggests that a PC file can be written, and read, using a KMotion C program. Here's the link:


 But when I try to compile the program, the tcc compiler doesn't know about "fscanf".

OK, I could generate text of a different sort and parse it myself. But the tcc compiler doesn't seem to know about "fread", either.

Is there a way to read, and well as write, any kind of text from a PC file?

Thanks,
Hugh

Group: DynoMotion Message: 12590 From: TK Date: 12/11/2015
Subject: Re: Options for reading PC file from KMotion C program
Hi Hugh,

Are you using the latest Released Version 4.33?

Regards
TK

On 12/11/2015 8:46 AM, Hugh Sontag hsontag@... [DynoMotion] wrote:
 
Hi Tom,

I have a question about the wiki.

I am hoping to save an offset from the machine zero to the zero set in KMotionCNC (what I call the GCode zero) in a nonvolatile place.

I'd prefer not to have to flash the user data memory to accomplish this.

I found an entry in the Dynomotion wiki which suggests that a PC file can be written, and read, using a KMotion C program. Here's the link:


 But when I try to compile the program, the tcc compiler doesn't know about "fscanf".

OK, I could generate text of a different sort and parse it myself. But the tcc compiler doesn't seem to know about "fread", either.

Is there a way to read, and well as write, any kind of text from a PC file?

Thanks,
Hugh


Group: DynoMotion Message: 12591 From: Hugh Sontag Date: 12/11/2015
Subject: Re: Options for reading PC file from KMotion C program
So the last error message I got, using 4.33, was on "fread". I tried "fread" when "fscanf" didn't work with 4.31s. 

It turns out that 4.33 does allow "fscanf".

Thanks,
Hugh

On Fri, Dec 11, 2015 at 1:41 PM, TK tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hi Hugh,

Are you using the latest Released Version 4.33?

Regards
TK

On 12/11/2015 8:46 AM, Hugh Sontag hsontag@... [DynoMotion] wrote:
 
Hi Tom,

I have a question about the wiki.

I am hoping to save an offset from the machine zero to the zero set in KMotionCNC (what I call the GCode zero) in a nonvolatile place.

I'd prefer not to have to flash the user data memory to accomplish this.

I found an entry in the Dynomotion wiki which suggests that a PC file can be written, and read, using a KMotion C program. Here's the link:


 But when I try to compile the program, the tcc compiler doesn't know about "fscanf".

OK, I could generate text of a different sort and parse it myself. But the tcc compiler doesn't seem to know about "fread", either.

Is there a way to read, and well as write, any kind of text from a PC file?

Thanks,
Hugh